home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Precision Software Appli…tions Silver Collection 1
/
Precision Software Applications Silver Collection Volume One (PSM) (1993).iso
/
tutor
/
dosguide.exe
/
HELPDOS.ZIP
/
BAT-OVER.HLP
< prev
next >
Wrap
Text File
|
1987-04-05
|
2KB
|
38 lines
Overview of the DOS Batch Facility
The DOS Batch Facility lets you execute many commands with just one command.
The commands to be executed are stored in a "Batch File." A batch file may
contain DOS commands, other batch file names, program names and Batch
Subcommands. Batch files may have any valid filename but must have .BAT as the
filename extension. To execute a batch file, enter the filename of the batch
file. DOS will execute the commands, one by one, as if they were entered from
the keyboard. Batch files are a convenient and time-saving feature. They
provide a way to automate the execution of a series of commands.
DOS has a special set of internal (resident in memory) commands that can be used
in batch files. These are called "Batch Subcommands." They give the Batch
Facility added function by allowing conditional execution of commands, repeated
execution of commands and other operations which broaden the batch file's
capability.
Here is a simple batch file named STARTUP.BAT. It contains two commands:
CHKDSK B:
LOTUS
This batch file is started by entering its name, STARTUP. DOS executes the first
line, CHKDSK B: and then the next line, LOTUS.
There is a special kind of batch file called AUTOEXEC.BAT. Each time DOS is
started, it looks for an AUTOEXEC.BAT file (in the root directory) and, if
found, executes it. This is a handy way to execute a number of commands each
time the computer is started.
You can terminate a batch file during its execution by holding down the CTRL key
and then pressing the BREAK key. DOS will then respond with:
Terminate batch job (Y/N)?
If you press Y, DOS will terminate the batch file. If you press N, DOS will
continue execution.